home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 April: Mac OS SDK / Dev.CD Apr 00 SDK1.toast / Development Kits / Mac OS / UPDATE- Int&Libs 3.2 / PInterfaces / UnicodeUtilities.p < prev    next >
Encoding:
Text File  |  1999-05-25  |  19.8 KB  |  440 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        UnicodeUtilities.p
  3.  
  4.      Contains:    Types, constants, prototypes for Unicode Utilities (Unicode input and text utils)
  5.  
  6.      Version:    Technology:    Allegro
  7.                  Release:    Veronica Seed, Use with 3.2 Universal Interfaces
  8.  
  9.      Copyright:    © 1997-1999 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. }
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT UnicodeUtilities;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __UNICODEUTILITIES__}
  27. {$SETC __UNICODEUTILITIES__ := 1}
  28.  
  29. {$I+}
  30. {$SETC UnicodeUtilitiesIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33. {$IFC UNDEFINED __MACTYPES__}
  34. {$I MacTypes.p}
  35. {$ENDC}
  36. {$IFC UNDEFINED __MACLOCALES__}
  37. {$I MacLocales.p}
  38. {$ENDC}
  39.  
  40. {$PUSH}
  41. {$ALIGN MAC68K}
  42. {$LibExport+}
  43.  
  44. {
  45.    -------------------------------------------------------------------------------------------------
  46.    CONSTANTS & DATA STRUCTURES for UCKeyTranslate & UCKeyboardLayout ('uchr' resource)
  47.    -------------------------------------------------------------------------------------------------
  48. }
  49.  
  50. {
  51.    -------------------------------------------------------------------------------------------------
  52.    UCKeyOutput & related stuff
  53.    The interpretation of UCKeyOutput depends on bits 15-14.
  54.    If they are 01, then bits 0-13 are an index in UCKeyStateRecordsIndex (resource-wide list).
  55.    If they are 10, then bits 0-13 are an index in UCKeySequenceDataIndex (resource-wide list),
  56.      or if UCKeySequenceDataIndex is not present or the index is beyond the end of the list,
  57.      then bits 0-15 are a single Unicode character.
  58.    Otherwise, bits 0-15 are a single Unicode character; a value of 0xFFFE-0xFFFF means no character
  59.      output.
  60.    UCKeyCharSeq is similar, but does not support indices in UCKeyStateRecordsIndex. For bits 15-14:
  61.    If they are 10, then bits 0-13 are an index in UCKeySequenceDataIndex (resource-wide list),
  62.      or if UCKeySequenceDataIndex is not present or the index is beyond the end of the list,
  63.      then bits 0-15 are a single Unicode character.
  64.    Otherwise, bits 0-15 are a single Unicode character; a value of 0xFFFE-0xFFFF means no character
  65.      output.
  66.    -------------------------------------------------------------------------------------------------
  67. }
  68.  
  69.  
  70. TYPE
  71.     UCKeyOutput                            = UInt16;
  72.     UCKeyCharSeq                        = UInt16;
  73.  
  74. CONST
  75.     kUCKeyOutputStateIndexMask    = $4000;
  76.     kUCKeyOutputSequenceIndexMask = $8000;
  77.     kUCKeyOutputTestForIndexMask = $C000;                        {  test bits 14-15 }
  78.     kUCKeyOutputGetIndexMask    = $3FFF;                        {  get bits 0-13 }
  79.  
  80. {
  81.    -------------------------------------------------------------------------------------------------
  82.    UCKeyStateRecord & related stuff
  83.    The UCKeyStateRecord information is used as follows. If the current state is zero,
  84.    output stateZeroCharData and set the state to stateZeroNextState. If the current state
  85.    is non-zero and there is an entry for it in stateEntryData, then output the corresponding
  86.    charData and set the state to nextState. Otherwise, output the state terminator from
  87.    UCKeyStateTerminators for the current state (or nothing if there is no UCKeyStateTerminators
  88.    table or it has no entry for the current state), then output stateZeroCharData and set the
  89.    state to stateZeroNextState.
  90.    -------------------------------------------------------------------------------------------------
  91. }
  92.  
  93.  
  94. TYPE
  95.     UCKeyStateRecordPtr = ^UCKeyStateRecord;
  96.     UCKeyStateRecord = RECORD
  97.         stateZeroCharData:        UCKeyCharSeq;
  98.         stateZeroNextState:        UInt16;
  99.         stateEntryCount:        UInt16;
  100.         stateEntryFormat:        UInt16;
  101.                                                                         {  This is followed by an array of stateEntryCount elements }
  102.                                                                         {  in the specified format. Here we just show a dummy array. }
  103.         stateEntryData:            ARRAY [0..0] OF UInt32;
  104.     END;
  105.  
  106. {
  107.    Here are the codes for entry formats currently defined.
  108.    Each entry maps from curState to charData and nextState.
  109. }
  110.  
  111. CONST
  112.     kUCKeyStateEntryTerminalFormat = $0001;
  113.     kUCKeyStateEntryRangeFormat    = $0002;
  114.  
  115. {
  116.    For UCKeyStateEntryTerminal -
  117.    nextState is always 0, so we don't have a field for it
  118. }
  119.  
  120.  
  121. TYPE
  122.     UCKeyStateEntryTerminalPtr = ^UCKeyStateEntryTerminal;
  123.     UCKeyStateEntryTerminal = RECORD
  124.         curState:                UInt16;
  125.         charData:                UCKeyCharSeq;
  126.     END;
  127.  
  128. {
  129.    For UCKeyStateEntryRange -
  130.    If curState >= curStateStart and curState <= curStateStart+curStateRange,
  131.    then it matches the entry, and we transform charData and nextState as follows:
  132.    If charData < 0xFFFE, then charData += (curState-curStateStart)*deltaMultiplier
  133.    If nextState != 0, then nextState += (curState-curStateStart)*deltaMultiplier
  134. }
  135.     UCKeyStateEntryRangePtr = ^UCKeyStateEntryRange;
  136.     UCKeyStateEntryRange = RECORD
  137.         curStateStart:            UInt16;
  138.         curStateRange:            SInt8;
  139.         deltaMultiplier:        SInt8;
  140.         charData:                UCKeyCharSeq;
  141.         nextState:                UInt16;
  142.     END;
  143.  
  144. {
  145.    -------------------------------------------------------------------------------------------------
  146.    UCKeyboardLayout & related stuff
  147.    The UCKeyboardLayout struct given here is only for the resource header. It specifies
  148.    offsets to the various subtables which each have their own structs, given below.
  149.    The keyboardTypeHeadList array selects table offsets that depend on keyboardType. The
  150.    first entry in keyboardTypeHeadList is the default entry, which will be used if the
  151.    keyboardType passed to UCKeyTranslate does not match any other entry - i.e. does not fall
  152.    within the range keyboardTypeFirst..keyboardTypeLast for some entry. The first entry
  153.    should have keyboardTypeFirst = keyboardTypeLast = 0.
  154.    -------------------------------------------------------------------------------------------------
  155. }
  156.     UCKeyboardTypeHeaderPtr = ^UCKeyboardTypeHeader;
  157.     UCKeyboardTypeHeader = RECORD
  158.         keyboardTypeFirst:        UInt32;                                    {  first keyboardType in this entry }
  159.         keyboardTypeLast:        UInt32;                                    {  last keyboardType in this entry }
  160.         keyModifiersToTableNumOffset: ByteOffset;                        {  required }
  161.         keyToCharTableIndexOffset: ByteOffset;                            {  required }
  162.         keyStateRecordsIndexOffset: ByteOffset;                            {  0 => no table }
  163.         keyStateTerminatorsOffset: ByteOffset;                            {  0 => no table }
  164.         keySequenceDataIndexOffset: ByteOffset;                            {  0 => no table }
  165.     END;
  166.  
  167.     UCKeyboardLayoutPtr = ^UCKeyboardLayout;
  168.     UCKeyboardLayout = RECORD
  169.                                                                         {  header only; other tables accessed via offsets }
  170.         keyLayoutHeaderFormat:    UInt16;                                    {  =kUCKeyLayoutHeaderFormat }
  171.         keyLayoutDataVersion:    UInt16;                                    {  0x0100 = 1.0, 0x0110 = 1.1, etc. }
  172.         keyLayoutFeatureInfoOffset: ByteOffset;                            {  may be 0                                     }
  173.         keyboardTypeCount:        ItemCount;                                {  Dimension for keyboardTypeHeadList[]         }
  174.         keyboardTypeList:        ARRAY [0..0] OF UCKeyboardTypeHeader;
  175.     END;
  176.  
  177. {  ------------------------------------------------------------------------------------------------- }
  178.     UCKeyLayoutFeatureInfoPtr = ^UCKeyLayoutFeatureInfo;
  179.     UCKeyLayoutFeatureInfo = RECORD
  180.         keyLayoutFeatureInfoFormat: UInt16;                                {  =kUCKeyLayoutFeatureInfoFormat }
  181.         reserved:                UInt16;
  182.         maxOutputStringLength:    UniCharCount;                            {  longest possible output string }
  183.     END;
  184.  
  185. {  ------------------------------------------------------------------------------------------------- }
  186.     UCKeyModifiersToTableNumPtr = ^UCKeyModifiersToTableNum;
  187.     UCKeyModifiersToTableNum = RECORD
  188.         keyModifiersToTableNumFormat: UInt16;                            {  =kUCKeyModifiersToTableNumFormat }
  189.         defaultTableNum:        UInt16;                                    {  For modifier combos not in tableNum[] }
  190.         modifiersCount:            ItemCount;                                {  Dimension for tableNum[] }
  191.         tableNum:                SInt8;
  192.                                                                         {  Then there is padding to a 4-byte boundary with bytes containing 0, if necessary. }
  193.     END;
  194.  
  195. {  ------------------------------------------------------------------------------------------------- }
  196.     UCKeyToCharTableIndexPtr = ^UCKeyToCharTableIndex;
  197.     UCKeyToCharTableIndex = RECORD
  198.         keyToCharTableIndexFormat: UInt16;                                {  =kUCKeyToCharTableIndexFormat }
  199.         keyToCharTableSize:        UInt16;                                    {  Max keyCode (128 for ADB keyboards) }
  200.         keyToCharTableCount:    ItemCount;                                {  Dimension for keyToCharTableOffsets[] (usually 6 to 12 tables) }
  201.         keyToCharTableOffsets:    ARRAY [0..0] OF ByteOffset;
  202.                                                                         {  Each offset in keyToCharTableOffsets is from the beginning of the resource to a }
  203.                                                                         {  table as follows: }
  204.                                                                         {     UCKeyOutput        keyToCharData[keyToCharTableSize]; }
  205.                                                                         {  These tables follow the UCKeyToCharTableIndex. }
  206.                                                                         {  Then there is padding to a 4-byte boundary with bytes containing 0, if necessary. }
  207.     END;
  208.  
  209. {  ------------------------------------------------------------------------------------------------- }
  210.     UCKeyStateRecordsIndexPtr = ^UCKeyStateRecordsIndex;
  211.     UCKeyStateRecordsIndex = RECORD
  212.         keyStateRecordsIndexFormat: UInt16;                                {  =kUCKeyStateRecordsIndexFormat }
  213.         keyStateRecordCount:    UInt16;                                    {  Dimension for keyStateRecordOffsets[] }
  214.         keyStateRecordOffsets:    ARRAY [0..0] OF ByteOffset;
  215.                                                                         {  Each offset in keyStateRecordOffsets is from the beginning of the resource to a }
  216.                                                                         {  UCKeyStateRecord. These UCKeyStateRecords follow the keyStateRecordOffsets[] array. }
  217.                                                                         {  Then there is padding to a 4-byte boundary with bytes containing 0, if necessary. }
  218.     END;
  219.  
  220. {  ------------------------------------------------------------------------------------------------- }
  221.     UCKeyStateTerminatorsPtr = ^UCKeyStateTerminators;
  222.     UCKeyStateTerminators = RECORD
  223.         keyStateTerminatorsFormat: UInt16;                                {  =kUCKeyStateTerminatorsFormat }
  224.         keyStateTerminatorCount: UInt16;                                {  Dimension for keyStateTerminators[] (# of nonzero states) }
  225.         keyStateTerminators:    ARRAY [0..0] OF UCKeyCharSeq;
  226.                                                                         {  Note: keyStateTerminators[0] is terminator for state 1, etc. }
  227.                                                                         {  Then there is padding to a 4-byte boundary with bytes containing 0, if necessary. }
  228.     END;
  229.  
  230. {  ------------------------------------------------------------------------------------------------- }
  231.     UCKeySequenceDataIndexPtr = ^UCKeySequenceDataIndex;
  232.     UCKeySequenceDataIndex = RECORD
  233.         keySequenceDataIndexFormat: UInt16;                                {  =kUCKeySequenceDataIndexFormat }
  234.         charSequenceCount:        UInt16;                                    {  Dimension of charSequenceOffsets[] is charSequenceCount+1 }
  235.         charSequenceOffsets:    ARRAY [0..0] OF UInt16;
  236.                                                                         {  Each offset in charSequenceOffsets is in bytes, from the beginning of }
  237.                                                                         {  UCKeySequenceDataIndex to a sequence of UniChars; the next offset indicates the }
  238.                                                                         {  end of the sequence. The UniChar sequences follow the UCKeySequenceDataIndex. }
  239.                                                                         {  Then there is padding to a 4-byte boundary with bytes containing 0, if necessary. }
  240.     END;
  241.  
  242. {  ------------------------------------------------------------------------------------------------- }
  243. {  Current format codes for the various tables (bits 12-15 indicate which table) }
  244.  
  245.  
  246. CONST
  247.     kUCKeyLayoutHeaderFormat    = $1002;
  248.     kUCKeyLayoutFeatureInfoFormat = $2001;
  249.     kUCKeyModifiersToTableNumFormat = $3001;
  250.     kUCKeyToCharTableIndexFormat = $4001;
  251.     kUCKeyStateRecordsIndexFormat = $5001;
  252.     kUCKeyStateTerminatorsFormat = $6001;
  253.     kUCKeySequenceDataIndexFormat = $7001;
  254.  
  255.  
  256. {
  257.    -------------------------------------------------------------------------------------------------
  258.    Constants for keyAction parameter in UCKeyTranslate() 
  259.    -------------------------------------------------------------------------------------------------
  260. }
  261.  
  262.     kUCKeyActionDown            = 0;                            {  key is going down }
  263.     kUCKeyActionUp                = 1;                            {  key is going up }
  264.     kUCKeyActionAutoKey            = 2;                            {  auto-key down }
  265.     kUCKeyActionDisplay            = 3;                            {  get information for key display (as in Key Caps)             }
  266.  
  267. {
  268.    -------------------------------------------------------------------------------------------------
  269.    Bit assignments & masks for keyTranslateOptions parameter in UCKeyTranslate() 
  270.    -------------------------------------------------------------------------------------------------
  271. }
  272.  
  273.     kUCKeyTranslateNoDeadKeysBit = 0;                            {  Prevents setting any new dead-key states }
  274.  
  275.     kUCKeyTranslateNoDeadKeysMask = $00000001;
  276.  
  277. {
  278.    -------------------------------------------------------------------------------------------------
  279.    CONSTANTS & DATA STRUCTURES for Unicode Collation
  280.    -------------------------------------------------------------------------------------------------
  281. }
  282.  
  283. TYPE
  284.     CollatorRef = ^LONGINT;
  285.     UCCollateOptions                    = UInt32;
  286.  
  287. CONST
  288.     kUCCollateComposeInsensitiveMask = $00000002;
  289.     kUCCollateWidthInsensitiveMask = $00000004;
  290.     kUCCollateCaseInsensitiveMask = $00000008;
  291.     kUCCollateDiacritInsensitiveMask = $00000010;
  292.  
  293.     kUCCollateStandardOptions    = $00000006;
  294.  
  295. {
  296.    Special values to specify various invariant orders for UCCompareTextNoLocale.
  297.    These values use the high 8 bits of UCCollateOptions.
  298. }
  299.     kUCCollateTypeHFSExtended    = 1;
  300.  
  301. {  These constants are used for masking and shifting the invariant order type. }
  302.     kUCCollateTypeSourceMask    = $000000FF;
  303.     kUCCollateTypeShiftBits        = 24;
  304.  
  305.     kUCCollateTypeMask            = $FF000000;
  306.  
  307.  
  308. TYPE
  309.     UCCollationValue                    = UInt32;
  310.     TextBreakLocatorRef = ^LONGINT;
  311. {
  312.    -------------------------------------------------------------------------------------------------
  313.    CONSTANTS & DATA STRUCTURES for Unicode TextBreak
  314.    -------------------------------------------------------------------------------------------------
  315. }
  316.     UCTextBreakType                        = FourCharCode;
  317.  
  318. CONST
  319.     kUCTextBreakCharType        = 'char';
  320.     kUCTextBreakWordType        = 'word';
  321.     kUCTextBreakLineType        = 'line';
  322.  
  323.  
  324. TYPE
  325.     UCTextBreakOptions                    = UInt32;
  326.  
  327. CONST
  328.     kUCTextBreakLeadingEdgeMask    = $00000001;
  329.     kUCTextBreakGoBackwardsMask    = $00000002;
  330.  
  331. {
  332.    -------------------------------------------------------------------------------------------------
  333.    CONSTANTS & DATA STRUCTURES for Unicode Properties
  334.    -------------------------------------------------------------------------------------------------
  335. }
  336.  
  337.  
  338. TYPE
  339.     UCCharPropertyType                    = SInt32;
  340.  
  341. CONST
  342.     kUCCharPropTypeGenlCategory    = 1;                            {  requests enumeration value }
  343.     kUCCharPropTypeCombiningClass = 2;                            {  requests numeric value 0..255 }
  344.     kUCCharPropTypeBidiCategory    = 3;                            {  requests enumeration value }
  345.  
  346.  
  347. TYPE
  348.     UCCharPropertyValue                    = UInt32;
  349. {  General Category enumeration values (requested by kUCCharPropTypeGenlCategory) }
  350.  
  351. CONST
  352.                                                                 {  Normative categories: }
  353.     kUCGenlCatOtherNotAssigned    = 0;                            {  Cn Other, Not Assigned }
  354.     kUCGenlCatOtherControl        = 1;                            {  Cc Other, Control }
  355.     kUCGenlCatOtherFormat        = 2;                            {  Cf Other, Format }
  356.     kUCGenlCatOtherSurrogate    = 3;                            {  Cs Other, Surrogate }
  357.     kUCGenlCatOtherPrivateUse    = 4;                            {  Co Other, Private Use }
  358.     kUCGenlCatMarkNonSpacing    = 5;                            {  Mn Mark, Non-Spacing }
  359.     kUCGenlCatMarkSpacingCombining = 6;                            {  Mc Mark, Spacing Combining }
  360.     kUCGenlCatMarkEnclosing        = 7;                            {  Me Mark, Enclosing }
  361.     kUCGenlCatNumberDecimalDigit = 8;                            {  Nd Number, Decimal Digit }
  362.     kUCGenlCatNumberLetter        = 9;                            {  Nl Number, Letter }
  363.     kUCGenlCatNumberOther        = 10;                            {  No Number, Other }
  364.     kUCGenlCatSeparatorSpace    = 11;                            {  Zs Separator, Space }
  365.     kUCGenlCatSeparatorLine        = 12;                            {  Zl Separator, Line }
  366.     kUCGenlCatSeparatorParagraph = 13;                            {  Zp Separator, Paragraph }
  367.                                                                 {  Informative categories: }
  368.     kUCGenlCatLetterUppercase    = 14;                            {  Lu Letter, Uppercase }
  369.     kUCGenlCatLetterLowercase    = 15;                            {  Ll Letter, Lowercase }
  370.     kUCGenlCatLetterTitlecase    = 16;                            {  Lt Letter, Titlecase }
  371.     kUCGenlCatLetterModifier    = 17;                            {  Lm Letter, Modifier }
  372.     kUCGenlCatLetterOther        = 18;                            {  Lo Letter, Other }
  373.     kUCGenlCatPunctConnector    = 20;                            {  Pc Punctuation, Connector }
  374.     kUCGenlCatPunctDash            = 21;                            {  Pd Punctuation, Dash }
  375.     kUCGenlCatPunctOpen            = 22;                            {  Ps Punctuation, Open }
  376.     kUCGenlCatPunctClose        = 23;                            {  Pe Punctuation, Close }
  377.     kUCGenlCatPunctInitialQuote    = 24;                            {  Pi Punctuation, Initial quote }
  378.     kUCGenlCatPunctFinalQuote    = 25;                            {  Pf Punctuation, Final quote }
  379.     kUCGenlCatPunctOther        = 26;                            {  Po Punctuation, Other }
  380.     kUCGenlCatSymbolMath        = 28;                            {  Sm Symbol, Math }
  381.     kUCGenlCatSymbolCurrency    = 29;                            {  Sc Symbol, Currency }
  382.     kUCGenlCatSymbolModifier    = 30;                            {  Sk Symbol, Modifier }
  383.     kUCGenlCatSymbolOther        = 31;                            {  So Symbol, Other }
  384.  
  385. {  Bidirectional Category enumeration values (requested by kUCCharPropTypeBidiCategory) }
  386.     kUCBidiCatNotApplicable        = 0;                            {  for now use this for unassigned }
  387.                                                                 {  Strong types: }
  388.     kUCBidiCatLeftRight            = 1;                            {  L  Left-Right }
  389.     kUCBidiCatRightLeft            = 2;                            {  R  Right-Left }
  390.                                                                 {  Weak types: }
  391.     kUCBidiCatEuroNumber        = 3;                            {  EN European Number }
  392.     kUCBidiCatEuroNumberSeparator = 4;                            {  ES European Number Separator }
  393.     kUCBidiCatEuroNumberTerminator = 5;                            {  ET European Number Terminator }
  394.     kUCBidiCatArabicNumber        = 6;                            {  AN Arabic Number }
  395.     kUCBidiCatCommonNumberSeparator = 7;                        {  CS Common Number Separator }
  396.                                                                 {  Separators: }
  397.     kUCBidiCatBlockSeparator    = 8;                            {  B  Block Separator }
  398.     kUCBidiCatSegmentSeparator    = 9;                            {  S  Segment Separator }
  399.                                                                 {  Neutrals: }
  400.     kUCBidiCatWhitespace        = 10;                            {  WS Whitespace }
  401.     kUCBidiCatOtherNeutral        = 11;                            {  ON Other Neutrals (unassigned codes could use this) }
  402.  
  403. {
  404.    -------------------------------------------------------------------------------------------------
  405.    FUNCTION PROTOTYPES
  406.    -------------------------------------------------------------------------------------------------
  407. }
  408.  
  409. FUNCTION UCKeyTranslate({CONST}VAR keyLayoutPtr: UCKeyboardLayout; virtualKeyCode: UInt16; keyAction: UInt16; modifierKeyState: UInt32; keyboardType: UInt32; keyTranslateOptions: OptionBits; VAR deadKeyState: UInt32; maxStringLength: UniCharCount; VAR actualStringLength: UniCharCount; VAR unicodeString: UniChar): OSStatus;
  410. {  Standard collation functions }
  411. FUNCTION UCCreateCollator(locale: LocaleRef; opVariant: LocaleOperationVariant; options: UCCollateOptions; VAR collatorRef: CollatorRef): OSStatus; C;
  412. FUNCTION UCGetCollationKey(collatorRef: CollatorRef; {CONST}VAR textPtr: UniChar; textLength: UniCharCount; maxKeySize: ItemCount; VAR actualKeySize: ItemCount; VAR collationKey: UCCollationValue): OSStatus; C;
  413. FUNCTION UCCompareCollationKeys({CONST}VAR key1Ptr: UCCollationValue; key1Length: ItemCount; {CONST}VAR key2Ptr: UCCollationValue; key2Length: ItemCount; VAR equivalent: BOOLEAN; VAR order: SInt32): OSStatus; C;
  414. FUNCTION UCCompareText(collatorRef: CollatorRef; {CONST}VAR text1Ptr: UniChar; text1Length: UniCharCount; {CONST}VAR text2Ptr: UniChar; text2Length: UniCharCount; VAR equivalent: BOOLEAN; VAR order: SInt32): OSStatus; C;
  415. FUNCTION UCDisposeCollator(VAR collatorRef: CollatorRef): OSStatus; C;
  416. {  Simple collation using default locale }
  417.  
  418. FUNCTION UCCompareTextDefault(options: UCCollateOptions; {CONST}VAR text1Ptr: UniChar; text1Length: UniCharCount; {CONST}VAR text2Ptr: UniChar; text2Length: UniCharCount; VAR equivalent: BOOLEAN; VAR order: SInt32): OSStatus; C;
  419.  
  420. {  Simple locale-independent collation }
  421.  
  422. FUNCTION UCCompareTextNoLocale(options: UCCollateOptions; {CONST}VAR text1Ptr: UniChar; text1Length: UniCharCount; {CONST}VAR text2Ptr: UniChar; text2Length: UniCharCount; VAR equivalent: BOOLEAN; VAR order: SInt32): OSStatus; C;
  423. {  Standard text break (text boundary) functions }
  424. FUNCTION UCCreateTextBreakLocator(locale: LocaleRef; opVariant: LocaleOperationVariant; breakType: UCTextBreakType; VAR breakRef: TextBreakLocatorRef): OSStatus; C;
  425. FUNCTION UCFindTextBreak(breakRef: TextBreakLocatorRef; options: UCTextBreakOptions; {CONST}VAR textPtr: UniChar; textLength: UniCharCount; startOffset: UniCharCount; VAR breakOffset: UniCharCount): OSStatus; C;
  426. FUNCTION UCDisposeTextBreakLocator(VAR breakRef: TextBreakLocatorRef): OSStatus; C;
  427. {  Standard Unicode properties functions }
  428.  
  429. FUNCTION UCGetCharProperty({CONST}VAR charPtr: UniChar; textLength: UniCharCount; propType: UCCharPropertyType; VAR propValue: UCCharPropertyValue): OSStatus; C;
  430. {$ALIGN RESET}
  431. {$POP}
  432.  
  433. {$SETC UsingIncludes := UnicodeUtilitiesIncludes}
  434.  
  435. {$ENDC} {__UNICODEUTILITIES__}
  436.  
  437. {$IFC NOT UsingIncludes}
  438.  END.
  439. {$ENDC}
  440.